package com.kha.listone.util;

public abstract class Orientation {
	private static Orientation orientation;

	public static void enableOrientations() {
		if (orientation == null) {
			orientation = getImplementation();
		}
	}

	private static Orientation getImplementation() {
		Orientation implementation = null;
		try {
			Class.forName("com.nokia.mid.ui.orientation.OrientationListener");
			Class c = Class.forName("com.kha.listone.util.OrientationImpl");
			implementation = (Orientation) (c.newInstance());
		} catch (Exception e) {
			// No orientation support
		}
		return implementation;
	}
}
